﻿using System;
using System.Diagnostics;
using System.IO;
using System.Threading.Tasks;
using CoreGraphics;
using Foundation;
using hotfix;
using mb;
using mb.iOS;
using MyExtensions;
using Quobject.SocketIoClientDotNet.Client;
using UIKit;

namespace libmp
{
    public class GlobalImpl : hotfix.IGlobal
    {
        public static SimpleVideoServer VideoServer { get; set; }
        public void OnDidLaunch()
        {
            ServiceLocator.Instance.Register<IPopManager, libmp.AlertImp>();
            Xamarin.Forms.Forms.Init();
            FFImageLoading.Forms.Platform.CachedImageRenderer.Init();
            VideoServer = new SimpleVideoServer();
            LoadEntryView();
        }

        void LoadEntryView()
        {
            var appDelegate = UIApplication.SharedApplication.Delegate as AppDelegate;
            appDelegate.NavController.SetViewControllers(new [] { new VCMain() }, true);
        }
    }

}